package com.edais.dao;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import com.edais.domain.ClickCount;
import com.edais.domain.ClickManyGrab;
import com.edais.persistence.ClickCountMapper;

@Repository

public class ClickCountDao {
	@Autowired
	public ClickCountMapper clickCountMapper;

	/**
	 * 根据参数查询功能点是否参与统计
	 * @param paramsMap
	 * @return 
	 * @throws Exception 
	 */
	public ClickCount getFuncByFuncId(Map<String, String> paramsMap) throws Exception {
		return clickCountMapper.getFuncByFuncId(paramsMap);
	}

	/**
	 * 统计用户点击率
	 * @param clickManyGrab
	 * @return 
	 * @throws Exception 
	 */
	public void insertClickManyGrab(ClickManyGrab clickManyGrab) throws Exception {
		clickCountMapper.insertClickManyGrab(clickManyGrab);
	}

	/**
	 * 更新用户点击率
	 * @param clickManyGrab
	 * @return 
	 * @throws Exception 
	 */
	public long uptClickManyGrab(ClickManyGrab clickManyGrab) throws Exception {
		return clickCountMapper.uptClickManyGrab(clickManyGrab);
	}
	
	/**
	 * 查询用户点击率
	 * @param insertMap
	 * @return 
	 * @throws Exception 
	 */
	public ClickManyGrab selClickManyGrab(ClickManyGrab clickManyGrab) throws Exception {
		return clickCountMapper.selClickManyGrab(clickManyGrab);
	}


}
